interface CanIndexNullable<K, V>
Interface CanIndexNullable<K,V>
specifies that a class can return a value associated with a particular key. This interface allows overloading of the []
operator used to load values. If this operator is applied, the appropriate index(K)
method will be called, returning a matching value or returning null
if the key cannot be found. This interface provides load indexing functionality for nullable arrays, maps, and other symbol tables. It differs from the CanIndex<K,V>
interface in that its index(K)
method can return null
. Interface CanIndexStoreNullable<K,V>
provides related index store functionality.
Modifiers | Return Types | Method and Description |
---|---|---|
public readonly |
(nullable V) |
index(K key) |
public readonly index(K key) => (nullable V)